package com.cms.portal.security.filter;

import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

/**
 * ClassName: CmsAuthenticationFilter
 * Description:
 * date: 2022/4/27 19:34
 *
 * @author 15516
 * @since JDK 1.8
 */
public class CmsAuthenticationFilter extends FormAuthenticationFilter {
    @Override
    protected boolean isLoginRequest(ServletRequest request, ServletResponse response) {
        return this.pathsMatch(this.getLoginUrl(),request) ||
                this.pathsMatch("/admin/cms/login.do",request);
    }

    @Override
    protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
        return super.executeLogin(request, response);
    }
}
